**********************************************************************************************************************************************
**********************************************************************************************************************************************
*Replication code for "Determining the credibility of commitments in international climate policy" by
*D. Victor, M. Lumkowsky, A. Dannenberg (2022)
**********************************************************************************************************************************************
**********************************************************************************************************************************************

*Settings***********************************************************************

version 15.1
discard
global MY_PATH_IN	"" // Enter path where data set is saved. 
global LOG_FILE 	"" // Enter path to save log-file. 
global LOG  ${LOG_FILE}Main_Text_Analysis.log
capture log close
log using "${LOG}", text replace
set more off
clear

********************************************************************************
*Load data set******************************************************************

use "${MY_PATH_IN}01_MAIN_TEXT_DATA.dta" 

********************************************************************************
*Table 1************************************************************************

tab IPCC

sum age 
sum age if IPCC == 0 
sum age if IPCC == 1

sum g6 
sum g6 if IPCC == 0
sum g6 if IPCC == 1

sum g7 
sum g7 if IPCC == 0
sum g7 if IPCC == 1

tab g5_2 
tab g5_2 if IPCC == 0
tab g5_2 if IPCC == 1

********************************************************************************
*Figure 1 - Left Panel Bars and CI**********************************************

ci mean d2_10 if OECD_CAT == 1
ci mean d2_10 if OECD_CAT == 3
ci mean d2_10 if OECD_CAT == 2
ci mean d2_10 if OECD_CAT == 4
ci mean d2_10 if OECD_CAT == 5
ci mean d2_10 if OECD_CAT == 6

********************************************************************************
*Figure 1 - Left Panel O Markers************************************************

sum d2_10 if OECD_CAT == 1 & IPCC == 0
sum d2_10 if OECD_CAT == 3 & IPCC == 0
sum d2_10 if OECD_CAT == 2 & IPCC == 0
sum d2_10 if OECD_CAT == 4 & IPCC == 0
sum d2_10 if OECD_CAT == 5 & IPCC == 0
sum d2_10 if OECD_CAT == 6 & IPCC == 0

********************************************************************************
*Figure 1 - Left Panel V Markers************************************************

sum d2_10 if OECD_CAT == 1 & IPCC == 1
sum d2_10 if OECD_CAT == 3 & IPCC == 1
sum d2_10 if OECD_CAT == 2 & IPCC == 1
sum d2_10 if OECD_CAT == 4 & IPCC == 1
sum d2_10 if OECD_CAT == 5 & IPCC == 1
sum d2_10 if OECD_CAT == 6 & IPCC == 1

********************************************************************************
*Figure 1 - Right Panel Bars and CI*********************************************

ci mean d1_10 if OECD_CAT == 1
ci mean d1_10 if OECD_CAT == 3
ci mean d1_10 if OECD_CAT == 2
ci mean d1_10 if OECD_CAT == 4
ci mean d1_10 if OECD_CAT == 5
ci mean d1_10 if OECD_CAT == 6

********************************************************************************
*Figure 1 - Right Panel O Markers**********************************************

sum d1_10 if OECD_CAT == 1 & IPCC == 0
sum d1_10 if OECD_CAT == 3 & IPCC == 0
sum d1_10 if OECD_CAT == 2 & IPCC == 0
sum d1_10 if OECD_CAT == 4 & IPCC == 0
sum d1_10 if OECD_CAT == 5 & IPCC == 0
sum d1_10 if OECD_CAT == 6 & IPCC == 0

********************************************************************************
*Figure 1 - Right Panel V Markers***********************************************

sum d1_10 if OECD_CAT == 1 & IPCC == 1
sum d1_10 if OECD_CAT == 3 & IPCC == 1
sum d1_10 if OECD_CAT == 2 & IPCC == 1
sum d1_10 if OECD_CAT == 4 & IPCC == 1
sum d1_10 if OECD_CAT == 5 & IPCC == 1
sum d1_10 if OECD_CAT == 6 & IPCC == 1

********************************************************************************
*Figure 2 - Left Panel Bars and CI**********************************************

ci mean d2_woh_4  
ci mean d2_woh_1 
ci mean d2_woh_9  
ci mean d2_woh_3 
ci mean d2_woh_8 
ci mean d2_woh_5  
ci mean d2_woh_6  
ci mean d2_woh_7  
ci mean d2_woh_2 

********************************************************************************
*Figure 2 - Left Panel O Markers************************************************

sum d2_woh_4 if IPCC == 0
sum d2_woh_1 if IPCC == 0
sum d2_woh_9 if IPCC == 0
sum d2_woh_3 if IPCC == 0
sum d2_woh_8 if IPCC == 0
sum d2_woh_5 if IPCC == 0
sum d2_woh_6 if IPCC == 0
sum d2_woh_7 if IPCC == 0
sum d2_woh_2 if IPCC == 0

********************************************************************************
*Figure 2 - Left Panel V Markers************************************************

sum d2_woh_4 if IPCC == 1
sum d2_woh_1 if IPCC == 1
sum d2_woh_9 if IPCC == 1
sum d2_woh_3 if IPCC == 1
sum d2_woh_8 if IPCC == 1
sum d2_woh_5 if IPCC == 1
sum d2_woh_6 if IPCC == 1
sum d2_woh_7 if IPCC == 1
sum d2_woh_2 if IPCC == 1

********************************************************************************
*Figure 2 - Right Panel Bars and CI*********************************************

ci mean d1_woh_4  
ci mean d1_woh_1 
ci mean d1_woh_9  
ci mean d1_woh_3 
ci mean d1_woh_8 
ci mean d1_woh_5  
ci mean d1_woh_6  
ci mean d1_woh_7  
ci mean d1_woh_2 

********************************************************************************
*Figure 2 - Right Panel O Markers************************************************

sum d1_woh_4 if IPCC == 0
sum d1_woh_1 if IPCC == 0
sum d1_woh_9 if IPCC == 0
sum d1_woh_3 if IPCC == 0
sum d1_woh_8 if IPCC == 0
sum d1_woh_5 if IPCC == 0
sum d1_woh_6 if IPCC == 0
sum d1_woh_7 if IPCC == 0
sum d1_woh_2 if IPCC == 0

********************************************************************************
*Figure 2 - Right Panel V Markers************************************************

sum d1_woh_4 if IPCC == 1
sum d1_woh_1 if IPCC == 1
sum d1_woh_9 if IPCC == 1
sum d1_woh_3 if IPCC == 1
sum d1_woh_8 if IPCC == 1
sum d1_woh_5 if IPCC == 1
sum d1_woh_6 if IPCC == 1
sum d1_woh_7 if IPCC == 1
sum d1_woh_2 if IPCC == 1

********************************************************************************
*Figure 3 - Left Panel Bars and CI**********************************************

ci mean d5_1 if OECD_CAT == 1
ci mean d5_6 if OECD_CAT == 1
ci mean d5_7 if OECD_CAT == 1
ci mean d5_5 if OECD_CAT == 1
ci mean d5_3 if OECD_CAT == 1
ci mean d5_2 if OECD_CAT == 1
ci mean d5_4 if OECD_CAT == 1
ci mean d5_8_n if OECD_CAT == 1

********************************************************************************
*Figure 3 - Left Panel O Markers************************************************

sum d5_1 if OECD_CAT == 1 & IPCC == 0 
sum d5_6 if OECD_CAT == 1 & IPCC == 0 
sum d5_7 if OECD_CAT == 1 & IPCC == 0 
sum d5_5 if OECD_CAT == 1 & IPCC == 0 
sum d5_3 if OECD_CAT == 1 & IPCC == 0 
sum d5_2 if OECD_CAT == 1 & IPCC == 0 
sum d5_4 if OECD_CAT == 1 & IPCC == 0 
sum d5_8_n if OECD_CAT == 1 & IPCC == 0 

********************************************************************************
*Figure 3 - Left Panel V Markers************************************************

sum d5_1 if OECD_CAT == 1 & IPCC == 1 
sum d5_6 if OECD_CAT == 1 & IPCC == 1 
sum d5_7 if OECD_CAT == 1 & IPCC == 1 
sum d5_5 if OECD_CAT == 1 & IPCC == 1 
sum d5_3 if OECD_CAT == 1 & IPCC == 1 
sum d5_2 if OECD_CAT == 1 & IPCC == 1 
sum d5_4 if OECD_CAT == 1 & IPCC == 1 
sum d5_8_n if OECD_CAT == 1 & IPCC == 1 

********************************************************************************
*Figure 3 - Middle Panel Bars and CI********************************************

ci mean d5_1 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_6 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_7 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_5 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_3 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_2 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_4 if (OECD_CAT == 2 | OECD_CAT == 3)
ci mean d5_8_n if (OECD_CAT == 2 | OECD_CAT == 3)

********************************************************************************
*Figure 3 - Middle Panel O Markers**********************************************

sum d5_1 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_6 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_7 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_5 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_3 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_2 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_4 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 
sum d5_8_n if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 0 

********************************************************************************
*Figure 3 - Middle Panel V Markers**********************************************

sum d5_1 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_6 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_7 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_5 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_3 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_2 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_4 if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 
sum d5_8_n if (OECD_CAT == 2 | OECD_CAT == 3) & IPCC == 1 

********************************************************************************
*Figure 3 - Right Panel Bars and CI*********************************************

ci mean d5_1 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_6 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_7 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_5 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_3 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_2 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_4 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)
ci mean d5_8_n if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6)

********************************************************************************
*Figure 3 - Right Panel O Markers***********************************************

sum d5_1 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_6 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_7 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_5 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_3 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_2 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_4 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 
sum d5_8_n if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 0 

********************************************************************************
*Figure 3 - Right Panel O Markers***********************************************

sum d5_1 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1
sum d5_6 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_7 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_5 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_3 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_2 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_4 if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 
sum d5_8_n if (OECD_CAT == 4 | OECD_CAT == 5 | OECD_CAT == 6) & IPCC == 1 

********************************************************************************
*Table 2************************************************************************

*Column 1
probit d2_10_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.PONT_NDC_REV_std i.f2_DUMMY_REV c.Quality_Institutions_std c.POLITY_std c.sum_rents_std c.CO2_PC_2019_std i.IPCC c.g6_std i.g5_DUMMY_NATIONAL, vce(robust)
margins, dydx(*) atmeans 

*Column 2
probit d2_10_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std i.d1_10_DUMMY i.f2_DUMMY_REV c.Quality_Institutions_std c.POLITY_std c.sum_rents_std c.CO2_PC_2019_std i.IPCC c.g6_std i.g5_DUMMY_NATIONAL, vce(robust)
margins, dydx(*) atmeans 

*Column 3
probit d2_10_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.PONT_NDC_REV_std c.ND_INDEX_2018_rev_std c.Quality_Institutions_std c.POLITY_std c.sum_rents_std c.CO2_PC_2019_std i.IPCC c.g6_std i.g5_DUMMY_NATIONAL, vce(robust)
margins, dydx(*) atmeans 

*Column 4
probit d2_10_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std i.d1_10_DUMMY c.ND_INDEX_2018_rev_std c.Quality_Institutions_std c.POLITY_std c.sum_rents_std c.CO2_PC_2019_std i.IPCC c.g6_std i.g5_DUMMY_NATIONAL, vce(robust)
margins, dydx(*) atmeans 

********************************************************************************
log close
********************************************************************************
********************************************************************************
